<!--
	作者：Sariay
	时间：2018-09-25
	描述：There may be a bug, but don't worry, QiLing(器灵) says that it can work normally!
-->
<!DOCTYPE html>
<html class="html-loading">
		

<head><meta name="generator" content="Hexo 3.8.0">
	<meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
  <title>
    
      网络编程 | SorrisoYi
    
  </title>
  <meta name="author" content="SorrisoYi">
  <meta name="keywords" content>
  <meta name="description" content="blog">
	<!-- favicon -->
  <link rel="shortcut icon" href="https://addyzk.github.io/Random-img/favicon.ico">

  <!-- css -->
  <link rel="stylesheet" href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="../../../../css/Annie.css">
  
  <!-- jquery -->
	<script src="../../../../js/jquery.min.js"></script>

  <!-- leancloud -->
  <script src="https://cdn1.lncld.net/static/js/av-core-mini-0.6.4.js"></script>
<script src="../../../../js/leancloud.js"></script>
</head>
	<body>
		<!-- Preloader -->

	<div id="preloader">
		<div class="pre-container">
			
				<div class="spinner">
					<div class="double-bounce1"></div>
					<div class="double-bounce2"></div>
				</div>
						
		</div>
	</div>


<!-- header -->
<header class="fixbackground" data-img-mode data-normal-src="../../../../index.html" data-random-max data-random-src="../../../../index.html">
	<div class="mask">
		<!-- Logo and navigation -->
		<div class="h-header">
			<div id="logo">
				<a href="/">
						
						<img src="https://addyzk.github.io/Random-img/logo.png" alt="Logo">
					
				</a>
			</div>
			
			<div id="navigation-show">
				<ul>
	
		<li class="menu-home">
			<a href="../../../../index.html" class="menu-item-home">主页</a>
		</li>
	
		<li class="menu-archive">
			<a href="../../../.././archives" class="menu-item-archive">归档</a>
		</li>
	
		<li class="menu-categories">
			<a href="../../../.././categories" class="menu-item-categories">分类</a>
		</li>
	
		<li class="menu-tags">
			<a href="../../../.././tags" class="menu-item-tags">标签</a>
		</li>
	
		<li class="menu-about">
			<a href="../../../.././about" class="menu-item-about">关于</a>
		</li>
	
		<li class="menu-gallery">
			<a href="../../../.././gallery" class="menu-item-gallery">相册</a>
		</li>
	

	
		<li class="menu-search">
			<a href="javascript:;" class="popup-trigger">搜索</a>
		</li>
	
</ul>
			</div>				
		</div>

		<!-- motto -->
		<div class="h-body">	
			
				<p class="motto"></p>
			
		</div>
		
		<!-- others: such as time... -->			
		<div class="h-footer">
			<a href="javascript:;" id="read-more"><i class="fa fa-angle-double-down" aria-hidden="true"></i>
			</a>

			
				<!-- 
	This is only a demo, please go to "https://time.is" to set your city time! 
-->
<style type="text/css">
	.header-date {
		font-size: 1.6rem;
		color: #fff;
		position: absolute;
		bottom: 5px;
		right: 1rem;
		writing-mode: tb-rl;
	}	
	
	.header-date a {
		border-bottom: none;
	}

	@media only screen and (max-width: 768 ) {
		.header-date {
			font-size: 1rem;
		}			
	}
</style>
<div class="header-date">
	<a href="https://time.is/Beijing" id="time_is_link" rel="nofollow"></a>
	<span id="Beijing_z43d"></span>
</div>
<script src="//widget.time.is/zh.js"></script>
<script>
	time_is_widget.init({
		Beijing_z43d:{
			template:"DATE", 
			date_format:"year年 monthname dnum日"
		}
	});
</script>
			
		</div>
	</div>
</header>

<div id="navigation-hide">
	<!-- Progress bar -->
	<div id="progress-bar"></div>

	<!-- Progress percent -->
	<div id="progress-percentage"><h1>0.0%</h1></div>

	<div class="toc-switch"><span class="switch-button">目录</span></div>

	<!-- Page title -->
	<p>
		
			当前文章&nbsp;:&nbsp;《网络编程》
		
	</p>

	<!-- Nav trigger for navigation-H-->
	<a class="nav-trigger"><span></span></a>
</div>

<!-- Navigation in div(id="navigation-H") -->
<nav class="nav-container" id="cd-nav">
	<div class="nav-header">
		<h3>Navigation</h3>
		<a href="javascript:;" class="nav-close"></a>
	</div>
	<div class="nav-body">
		<ul>
	
		<li class="menu-home">
			<a href="../../../../index.html" class="menu-item-home">主页</a>
		</li>
	
		<li class="menu-archive">
			<a href="../../../.././archives" class="menu-item-archive">归档</a>
		</li>
	
		<li class="menu-categories">
			<a href="../../../.././categories" class="menu-item-categories">分类</a>
		</li>
	
		<li class="menu-tags">
			<a href="../../../.././tags" class="menu-item-tags">标签</a>
		</li>
	
		<li class="menu-about">
			<a href="../../../.././about" class="menu-item-about">关于</a>
		</li>
	
		<li class="menu-gallery">
			<a href="../../../.././gallery" class="menu-item-gallery">相册</a>
		</li>
	

	
		<li class="menu-search">
			<a href="javascript:;" class="popup-trigger">搜索</a>
		</li>
	
</ul>
	</div>
	<div class="nav-footer">
		<ul>
	
		<li>
			<a href="http://github.com/addyzk" target="_blank">
				<i class="fa fa-github"></i>
			</a>
		</li>
	
		<li>
			<a href="https://weibo.com/u/2943549915" target="_blank">
				<i class="fa fa-weibo"></i>
			</a>
		</li>
	
		<li>
			<a href="http://github.com/" target="_blank">
				<i class="fa fa-pinterest"></i>
			</a>
		</li>
	
		<li>
			<a href="http://github.com/" target="_blank">
				<i class="fa fa-instagram"></i>
			</a>
		</li>
	
		<li>
			<a href="http://github.com/" target="_blank">
				<i class="fa fa-twitter"></i>
			</a>
		</li>
	
		<li>
			<a href="../../../../atom.xml" target="_blank">
				<i class="fa fa-rss"></i>
			</a>
		</li>
			
</ul>

	</div>
</nav>
			
		<!--main-->
		<main>
			<!--
	时间：2018-11-17
	描述：
		插件名称：katelog.min.js
		插件作者：KELEN
		插件来源: https://github.com/KELEN/katelog
-->

	
		<div class="layout-toc">
			<div id="layout-toc">
				<div class="k-catelog-list" id="catelog-list" data-title="文章目录"></div>
			</div>
		</div>

		
		<script src="../../../../plugin/toc/katelog.min.js"></script>

		
	 

<div class="layout-post">
	<div id="layout-post">
	<div class="article-title">
		<i class="fa fa-paper-plane-o" aria-hidden="true"></i>
		
	<a href itemprop="url">
		网络编程
	</a>

	</div>

	<div class="article-meta">
		<span>
			<i class="fa fa-calendar"></i>
			


	发布于

	<a href itemprop="url">
		<time datetime="2018-08-29T12:16:19.000Z" itemprop="datePublished">
	  		2018-08-29
	  </time>
	</a>
	&nbsp;





			




	更新于

	<a href itemprop="url">
		<time datetime="2018-08-29T12:16:19.000Z" itemprop="dateUpdated">
	  		2019-05-18
	  </time>
	</a> 



		</span>
		<span>
			<i class="fa fa-tags"></i>
			
	
		<a href="../../../../tags/web/" class=" ">
			web
		</a>
	
		
		</span>
		
		

	
    <span class="leancloud_visitors" id="_visitors" data-url data-title="网络编程">
       	<i class="fa fa-eye"></i>
       	热度
        <i class="leancloud_visitors_count" id="leancloud_visitors_count">0</i>
    </span>
    



	
    <span class="leancloud_likes" id="_likes" data-url data-title="网络编程" rel="unlike">
        <i class="fa fa-heart"></i>
        喜欢
        <i class="leancloud_likes_count" id="leancloud_likes_count">0</i>
    </span>

	</div>

	<div class="article-content" id="article-content">
		<p>计算机之间的通信，三次握手，四次挥手！TCP/UDP协议！</p>
<h2 id="17-网络编程"><a href="#17-网络编程" class="headerlink" title="17 网络编程"></a>17 网络编程</h2><h2 id="一、网络编程"><a href="#一、网络编程" class="headerlink" title="一、网络编程"></a>一、网络编程</h2><h4 id="1-网络编程基础"><a href="#1-网络编程基础" class="headerlink" title="1.网络编程基础"></a>1.网络编程基础</h4><blockquote>
<p>计算机网络：把分布在不同区域的计算机通过专门的设备使用通信线路连接起来，从而会形成一个庞大的网络系统，不同的计算机之间就可以进行信息的传递</p>
<p>网络编程：在同一个网络中不同的机器之间进行通信</p>
</blockquote>
<h4 id="2-计算机之间需要通信的条件"><a href="#2-计算机之间需要通信的条件" class="headerlink" title="2.计算机之间需要通信的条件"></a>2.计算机之间需要通信的条件</h4><blockquote>
<p>三要素：ip地址，端口，协议</p>
</blockquote>
<h5 id="2-1-ip地址"><a href="#2-1-ip地址" class="headerlink" title="2.1 ip地址"></a>2.1 ip地址</h5><blockquote>
<ul>
<li><p>概念</p>
<pre><code>互联网地址（Internet Protocol Address），是联网设备和互联网之间的唯一标识，在同一个网段中，ip地址是唯一的

ip地址是数字型的，是一个32位整数，通常将其分为4个8位的二进制，每8位用圆点隔开，并且将8位的二进制转换为0~255之间的十进制，例如：10.0.127.108
</code></pre></li>
<li><p>分类</p>
<pre><code>形式分类：

    ipv4:由4个字节组成，分成4段

    ipv6:由6个字节组成，分为6段

功能分类：

    A类：保留给政府机构，1.0.0.1~126.255.255.254

    B类：分配给中小型企业，128.1.0.1-191.255.255.254 

    C类：分配给任何需要的个人，192.0.1.1-223.255.255.254 

    D类：用于组播【一种数据传输方式】，224.0.0.1-239.255.255.254 

    E类：用于实验，240....~255.....

    127.0.0.1   回送地址，一般指的是本机的ip，localhost，一般用于测试
</code></pre></li>
</ul>
<p>总结：ip地址可以唯一的确定网络上一个通信实体，但是一个通信实体可以有多个应用程序同时提供网络服务，此时还需要端口</p>
</blockquote>
<h5 id="2-2端口"><a href="#2-2端口" class="headerlink" title="2.2端口"></a>2.2端口</h5><blockquote>
<p>1&gt;概念</p>
<p>​    数据的发送和接收都需要通过端口出入计算机，端口号是唯一标识通信实体上的应用程序</p>
<p>​    注意：同一台机器上不能两个程序占用同一个端口，端口号：0~65535</p>
<p>2&gt;分类</p>
<p>​    a.公认端口：0~1023   </p>
<p>​    b.注册端口：1025~49151</p>
<p>​    c.动态端口或者私有端口：1024~65535</p>
<p>3&gt;常用的端口</p>
<p>​    mysql:3306</p>
<p>​    oracle:1521</p>
<p>​    tomcat:8080</p>
<p>​    qq:4000</p>
</blockquote>
<h5 id="2-3网络协议"><a href="#2-3网络协议" class="headerlink" title="2.3网络协议"></a>2.3网络协议</h5><blockquote>
<p>网络协议：只要连接到网络的设备，相互之间遵循同一种网络协议，才能够进行数据交互</p>
<p><img src="网络模型.gif" alt="网络模型"></p>
</blockquote>
<h4 id="3-TCP-IP协议"><a href="#3-TCP-IP协议" class="headerlink" title="3.TCP/IP协议"></a>3.TCP/IP协议</h4><blockquote>
<p>互联网协议，负责两台计算机之间建立可靠的【保证数据安全到达对方】，可连接【面向连接，三次握手】的通信</p>
</blockquote>
<h4 id="4-TCP协议"><a href="#4-TCP协议" class="headerlink" title="4.TCP协议"></a>4.TCP协议</h4><h5 id="4-1概念"><a href="#4-1概念" class="headerlink" title="4.1概念"></a>4.1概念</h5><blockquote>
<p>Transimission Control Protocol ,传输控制协议，基于字节的传输层通信协议</p>
<p>特点：</p>
<p>​    a.安全的【确保接收方完全正确的获取发送方发送的全部数据】</p>
<p>​    b.面向连接的【数据传输必须要建立连接，连接的过程中需要时间】</p>
<p>​    c.数据传输的效率较低</p>
<p>​    d.传输的数据的大小有限制，一旦连接建立，双方可以通过指定的格式发送数据</p>
<ul>
<li><p>面向连接：三次握手</p>
<pre><code>a.客户端向服务端发送一个请求

b.服务端收到请求之后，回客户端一个响应

c.客户端收到服务端的响应之后，回复给服务端一个确认信息
</code></pre></li>
</ul>
<p><img src="三次握手.png" alt="三次握手"></p>
<ul>
<li>四次挥手    <ul>
<li>（1） TCP客户端发送一个FIN，用来关闭客户到服务器的数据传送。</li>
<li>（2） 服务器收到这个FIN，它发回一个ACK，确认序号为收到的序号加1。和SYN一样，一个FIN将占用一个序号。</li>
<li>（3） 服务器关闭客户端的连接，发送一个FIN给客户端。</li>
<li>（4） 客户端发回ACK报文确认，并将确认序号设置为收到序号加1。</li>
</ul>
</li>
</ul>
<p><img src="四次挥手.png" alt="四次挥手"></p>
<p>说明：</p>
<p>​    使用tcp来实现数据的发送和接收需要发送方和接收方，但是两个通信实体之间没有明确的客户端和服务端之分，在两个通信实体建立连接之前，必须有一个通信实体做出主动姿态，被称为客户端</p>
</blockquote>
<h5 id="4-2-Socket通信"><a href="#4-2-Socket通信" class="headerlink" title="4.2  Socket通信"></a>4.2  Socket通信</h5><p>​    Socket是应用层与TCP/IP协议族通信的中间软件抽象层，它是一组接口。在设计模式中，Socket其实就是一个门面模式，它把复杂的TCP/IP协议族隐藏在Socket接口后面，对用户来说，一组简单的接口就是全部，让Socket去组织数据，以符合指定的协议。Socket:套接字，作用：可以发送和接收数据</p>
<blockquote>
<p>Socket必须知道目标计算机的ip地址，端口号，指定协议类型【TCP】</p>
<p><img src="tcp通信.png" alt="tcp通信"></p>
<p>注意：</p>
<p>a.同一个端口号，如果被一个socket绑定之后，则其他的socket将不能再绑定</p>
<p>b.tcp创建连接的是双向通道，谁先发消息，则默认为是客户端，另外一方位服务端</p>
</blockquote>
<h4 id="5-UDP协议"><a href="#5-UDP协议" class="headerlink" title="5.UDP协议"></a>5.UDP协议</h4><blockquote>
<p>User Datagram Protocol,用户数据包协议，提供面向无连接的不可靠的信息传输服务</p>
<p>特点：</p>
<p>​    a.不安全【发送方只负责将信息发送出去，数据能不能到达对方，或者到达对方的信息是否正确，都不做任何保证】</p>
<p>​    b.无连接的【进行信息发送之前，无需进行发送方和接收方之间的连接】</p>
<p>​    c.速度快</p>
<p>​    d.大小是有限制的，每个数据包的大小必须限制在64k以内</p>
<p><img src="udp.png" alt="udp"></p>
</blockquote>
<h2 id="二、高阶函数"><a href="#二、高阶函数" class="headerlink" title="二、高阶函数"></a>二、高阶函数</h2><p>如果一个函数的参数是另外一个函数，那么这个函数就可以称为高阶函数</p>
<h2 id="2-1-map"><a href="#2-1-map" class="headerlink" title="2.1 map"></a>2.1 map</h2><p>map是系统内置函数，map函数接收两个参数，一个是函数，一个是可迭代对象(Iterable)，map将传入的函数依次作用到序列的每个元素，并把结果作为新的Iterator返回。</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">"""</span></span><br><span class="line"><span class="string">map(function,iterable)</span></span><br><span class="line"><span class="string">参数1：function，函数,函数的参数个数取决于后面序列的个数</span></span><br><span class="line"><span class="string">参数2：iterable，一个序列或多个序列</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"><span class="string">功能：将传入的函数依次作用于序列中的每一个元素，并把结果作为新的Iterator返回</span></span><br><span class="line"><span class="string">"""</span></span><br><span class="line"><span class="comment">#1.传入函数一个参数</span></span><br><span class="line"><span class="function"><span class="keyword">def</span> <span class="title">fun</span><span class="params">(x)</span>:</span></span><br><span class="line">    <span class="keyword">return</span>  x ** <span class="number">2</span></span><br><span class="line"></span><br><span class="line"><span class="comment">#需求：获取一个列表中每个元素的平方，生成一个新的列表</span></span><br><span class="line">l1 = map(fun,[<span class="number">1</span>,<span class="number">2</span>,<span class="number">3</span>,<span class="number">4</span>])</span><br><span class="line">print(l1)   <span class="comment">#&lt;map object at 0x000001E86D3DA6D8&gt; #返回的是迭代器</span></span><br><span class="line">print(list(l1))  <span class="comment">#[1, 4, 9, 16]  #将迭代器转换为迭代对象</span></span><br><span class="line"></span><br><span class="line"><span class="comment">#传入函数2个参数</span></span><br><span class="line">l1 = [<span class="number">1</span>,<span class="number">2</span>,<span class="number">3</span>,<span class="number">4</span>]</span><br><span class="line">l2 = [<span class="number">2</span>,<span class="number">3</span>,<span class="number">4</span>,<span class="number">5</span>,<span class="number">6</span>,<span class="number">7</span>]</span><br><span class="line"><span class="function"><span class="keyword">def</span> <span class="title">mul</span><span class="params">(x, y)</span>:</span></span><br><span class="line">    <span class="keyword">return</span> x * y</span><br><span class="line"><span class="comment">#注意如果两个列表长度不一样，以短的为主计算，函数是平行取值，也就是说x取l1的值，y取l2的值</span></span><br><span class="line">gen1 = map(mul,l1,l2)  <span class="comment">#可以使用lambda表达式</span></span><br><span class="line">print(list(gen1))  <span class="comment">#[2, 6, 12, 20]</span></span><br><span class="line"></span><br><span class="line"><span class="comment">#提取字典的键</span></span><br><span class="line">gen3 = map(<span class="keyword">lambda</span> x:int(x),&#123;<span class="string">'1'</span>:<span class="number">10</span>,<span class="string">'2'</span>:<span class="number">20</span>&#125;)</span><br><span class="line">print(list(gen3)) <span class="comment">#[1,2]</span></span><br><span class="line"></span><br><span class="line"><span class="comment">#元组</span></span><br><span class="line">gen4 = map(<span class="keyword">lambda</span> x,y:(x,y),[<span class="number">1</span>,<span class="number">2</span>,<span class="number">3</span>,<span class="number">4</span>,<span class="number">5</span>],[<span class="number">1</span>,<span class="number">2</span>,<span class="number">3</span>])</span><br><span class="line">print(list(gen4))  <span class="comment">#[(1, 1), (2, 2), (3, 3)]</span></span><br></pre></td></tr></table></figure>
<h2 id="2-2-reduce"><a href="#2-2-reduce" class="headerlink" title="2.2 reduce"></a>2.2 reduce</h2><p>reduce()函数也是functools模块中的一个高阶函数。需要引入functools模块才能使用。</p>
<figure class="highlight asciidoc"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br></pre></td><td class="code"><pre><span class="line">'''</span><br><span class="line">functools.reduce(f, iterable[, initializer])</span><br><span class="line">参数1：函数，这个函数需要两个参数。</span><br><span class="line">参数2：可迭代对象</span><br><span class="line">参数3：可选，是默认值</span><br><span class="line">返回值：f函数计算的结果</span><br><span class="line">'''</span><br><span class="line">from functools import reduce</span><br><span class="line">#1.累加求和</span><br><span class="line">def add(x,y)</span><br><span class="line"><span class="code">    return x + y</span></span><br><span class="line">print(reduce(f,[1,2,3,4,5],5))</span><br><span class="line">计算过程：</span><br><span class="line"><span class="code"> （1）a = f(1,2)  #将1赋值给x，2赋值给y</span></span><br><span class="line"><span class="code"> （2）a = f(a,3)  #a赋值给x，3赋值给y</span></span><br><span class="line"><span class="code"> （3）a = f(a,4)</span></span><br><span class="line"><span class="code">  (4）a = f(a,5)</span></span><br><span class="line"><span class="code">  (5）f(d,10) = 20</span></span><br><span class="line"></span><br><span class="line">#将序列变成整数</span><br><span class="line">print(reduce(lambda x,y:x*10+y,[9,0,7,8])) #9078</span><br></pre></td></tr></table></figure>
<h2 id="2-3-filter"><a href="#2-3-filter" class="headerlink" title="2.3 filter"></a>2.3 filter</h2><p>filter是内建函数，可以对可迭代对象进行过滤，去除不满足条件的元素</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line">filter(function, iterable) </span><br><span class="line">参数： function 确定是否保留元素，为真保留，为假去除元素,function的值可以<span class="literal">None</span></span><br><span class="line">       iterable 可迭代对象</span><br><span class="line">返回值：一个新的迭代器或迭代对象</span><br><span class="line"><span class="comment">#1 过滤掉非字符串数据</span></span><br><span class="line">print(filter(<span class="keyword">lambda</span> x:isinstance(x,str),[<span class="string">'1'</span>,<span class="number">8</span>,<span class="string">'2'</span>,<span class="number">3</span>,<span class="literal">True</span>,<span class="number">0.9</span>])) </span><br><span class="line">等价于:</span><br><span class="line">  [s <span class="keyword">for</span> s <span class="keyword">in</span> [<span class="string">'1'</span>,<span class="number">8</span>,<span class="string">'2'</span>,<span class="number">3</span>,<span class="literal">True</span>,<span class="number">0.9</span>] <span class="keyword">if</span> isinstance(s,str)]</span><br><span class="line">  </span><br><span class="line"><span class="comment">#2 回文数</span></span><br><span class="line"><span class="comment">#回文数判断</span></span><br><span class="line"><span class="function"><span class="keyword">def</span> <span class="title">is_palindrome</span><span class="params">(n)</span>:</span></span><br><span class="line">    l1 = list(str(n))  <span class="comment">#将数字转换为字符串，再将字符串转为列表</span></span><br><span class="line">    l2 = l1[::<span class="number">-1</span>] <span class="comment">#获取反向列表</span></span><br><span class="line">    <span class="keyword">if</span> l1 == l2:  <span class="comment">#列表比较,长度相同，每一个元素都相同则为真</span></span><br><span class="line">        <span class="keyword">return</span> <span class="literal">True</span></span><br><span class="line">    <span class="keyword">return</span> <span class="literal">False</span></span><br><span class="line"></span><br><span class="line"><span class="comment">#找出1-1000内所有的回文数</span></span><br><span class="line">print(list(filter(is_palindrome,range(<span class="number">1</span>,<span class="number">1001</span>))))</span><br></pre></td></tr></table></figure>
<h2 id="2-4-sorted"><a href="#2-4-sorted" class="headerlink" title="2.4 sorted"></a>2.4 sorted</h2><p>sorted是内建函数，用于对有序序列进行排序，生成一个新序列</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">sorted(iterable[, key=<span class="literal">None</span>][, reverse=<span class="literal">False</span>]) </span><br><span class="line">参数：iterable  排序对象，可以列表、元组、字符串等有序序列</span><br><span class="line">      key 一个函数，作用于序列的每一个元素，根据函数返回值进行排序，</span><br><span class="line">           具体的函数的参数就是取自于可迭代对象中，</span><br><span class="line">      reverse 默认从小到大排序，如果reverse为<span class="literal">True</span>则从大到小排序</span><br><span class="line">返回值： 新的序列</span><br><span class="line"><span class="comment">#字符串排序</span></span><br><span class="line">print(sorted([<span class="string">'bob'</span>, <span class="string">'about'</span>, <span class="string">'Zoo'</span>, <span class="string">'Credit'</span>], key=str.lower)) <span class="comment">#指定把元素变为小写后再排序</span></span><br><span class="line"></span><br><span class="line"><span class="comment">#多维数据排序</span></span><br><span class="line">l=[(<span class="string">'a'</span>, <span class="number">1</span>), (<span class="string">'b'</span>, <span class="number">2</span>), (<span class="string">'c'</span>, <span class="number">6</span>), (<span class="string">'d'</span>, <span class="number">4</span>), (<span class="string">'e'</span>, <span class="number">3</span>)]</span><br><span class="line">print(sorted(l,key=<span class="keyword">lambda</span> x:x[<span class="number">1</span>]))  <span class="comment">#使用元组的第二个元素排序</span></span><br><span class="line"></span><br><span class="line">students = [&#123;<span class="string">'name'</span>:<span class="string">'abc'</span>,<span class="string">'gender'</span>:<span class="string">'男'</span>,<span class="string">'age'</span>:<span class="number">23</span>&#125; ,</span><br><span class="line">            &#123;<span class="string">'name'</span>: <span class="string">'kkd'</span>, <span class="string">'gender'</span>: <span class="string">'男'</span>, <span class="string">'age'</span>: <span class="number">19</span>&#125; ,</span><br><span class="line">            &#123;<span class="string">'name'</span>: <span class="string">'ccxsbc'</span>, <span class="string">'gender'</span>: <span class="string">'男'</span>, <span class="string">'age'</span>: <span class="number">20</span>&#125;]</span><br><span class="line">print(sorted(students,key=<span class="keyword">lambda</span> elem:elem[<span class="string">'age'</span>]))  <span class="comment">#指定用age排序</span></span><br></pre></td></tr></table></figure>
	
	</div>
	
	<div id="current-post-cover" data-scr="https://addyzk.github.io/Random-img/1.jpg"></div>

	<!-- relate post, comment...-->
	<div class="investment-container">
		<div class="investment-header">
			<div class="investment-title-1">
				<div class="on">相关文章</div>
				<div>评论</div>
				<div>分享</div>
			</div>
			<div class="investment-title-2">	            
				
	<span>
		<a href="javascript: window.scrollTo(0, 0);">返回顶部</a>
		
			<a href="../../../09/17/sql优化/" title="mysql优化" rel="prev">
				&laquo;上一篇
			</a>
		
		
			<a href="../../../05/12/redis/" title="redis" rel="next">
				下一篇&raquo;
			</a>
			
	</span>


      		
			</div>	
		</div>
		
		<div class="investment-content">
			<div class="investment-content-list">
				

<div class="relate-post">
	
		<ul>
			
					<li>
						<div class="relate-post-text">
							<a class="relate-post-title" href="../../../04/27/项目部署/" title="项目部署">
								项目部署			
							</a>
							<p class="relate-post-date">
								<i class="fa fa-calendar"></i>
								四月 27日, 2018				
							</p>
							<p class="relate-post-content">
								一、项目部署基本流程1234567891011- 虚拟环境- 数据库- 项目上传- 项目依赖- 数据迁移- Nginx- uWSGI- Nginx和uWSGI对接
二、虚拟环境12345678910111213141516171819...
							</p>
						</div>

						<div class="relate-post-cover">
							<a href="../../../04/27/项目部署/" title="项目部署">				
								
								<img class="lazy" src="/img/placeholder.jpg" data-src="https://addyzk.github.io/Random-img/99.jpg" alt="项目部署">
							</a>
						</div>
					</li>											
			
			
					<li>
						<div class="relate-post-text">
							<a class="relate-post-title" href="../../../../2019/05/28/linux/" title="linux">
								linux			
							</a>
							<p class="relate-post-date">
								<i class="fa fa-calendar"></i>
								五月 28日, 2019				
							</p>
							<p class="relate-post-content">
								一、课程简介
linux服务器配置及常用命令

开发软件配置及服务环境的搭建

软件的安装和配置

mysql数据库使用、monDB使用、redius的使用

git的使用

html/css


课程学习方式
表达训练     

...
							</p>
						</div>

						<div class="relate-post-cover">
							<a href="../../../../2019/05/28/linux/" title="linux">				
								
								<img class="lazy" src="/img/placeholder.jpg" data-src="https://addyzk.github.io/Random-img/88.jpg" alt="linux">
							</a>
						</div>
					</li>											
			
			
					<li>
						<div class="relate-post-text">
							<a class="relate-post-title" href="../../../../2019/05/16/hello-world/" title="Hello my friend!">
								Hello my friend!			
							</a>
							<p class="relate-post-date">
								<i class="fa fa-calendar"></i>
								五月 16日, 2019				
							</p>
							<p class="relate-post-content">
								Welcome to my blog ! This is your very first post. Check documentation for more info. If you get any problems when us...
							</p>
						</div>

						<div class="relate-post-cover">
							<a href="../../../../2019/05/16/hello-world/" title="Hello my friend!">				
								
								<img class="lazy" src="/img/placeholder.jpg" data-src="https://addyzk.github.io/Random-img/2.jpg" alt="Hello my friend!">
							</a>
						</div>
					</li>											
			
			
					<li>
						<div class="relate-post-text">
							<a class="relate-post-title" href="../../../../2019/04/18/Python进阶/" title="python进阶">
								python进阶			
							</a>
							<p class="relate-post-date">
								<i class="fa fa-calendar"></i>
								四月 18日, 2019				
							</p>
							<p class="relate-post-content">
								Python 进阶1. PEP8 编码规范, 及开发中的一些惯例和建议练习: 规范化这段代码
12345678910from django.conf import settingsfrom user.models import *im...
							</p>
						</div>

						<div class="relate-post-cover">
							<a href="../../../../2019/04/18/Python进阶/" title="python进阶">				
								
								<img class="lazy" src="/img/placeholder.jpg" data-src="https://addyzk.github.io/Random-img/28.jpg" alt="python进阶">
							</a>
						</div>
					</li>											
			
			
					<li>
						<div class="relate-post-text">
							<a class="relate-post-title" href="../../../10/12/mysql高级/" title="mysql高级">
								mysql高级			
							</a>
							<p class="relate-post-date">
								<i class="fa fa-calendar"></i>
								十月 12日, 2018				
							</p>
							<p class="relate-post-content">
								#mysql数据库
一、高级1.1 子查询
子查询嵌入到其他查询语句中查询语句，子查询只能出现在from，where中
子查询不要用select *,exists除外

12345678910select title from for...
							</p>
						</div>

						<div class="relate-post-cover">
							<a href="../../../10/12/mysql高级/" title="mysql高级">				
								
								<img class="lazy" src="/img/placeholder.jpg" data-src="https://addyzk.github.io/Random-img/15.jpg" alt="mysql高级">
							</a>
						</div>
					</li>											
			
			
					<li>
						<div class="relate-post-text">
							<a class="relate-post-title" href="../../../09/17/sql优化/" title="mysql优化">
								mysql优化			
							</a>
							<p class="relate-post-date">
								<i class="fa fa-calendar"></i>
								九月 17日, 2018				
							</p>
							<p class="relate-post-content">
								mysql优化一、数据库设计原则数据库设计的三范式学生表(学号，姓名，生日，课程名，课程成绩，等级，学院，院长)



学号
姓名
生日
课程号
课程名
成绩
等级
学院
院长




10001
张三
1998.1.1
tp3021...
							</p>
						</div>

						<div class="relate-post-cover">
							<a href="../../../09/17/sql优化/" title="mysql优化">				
								
								<img class="lazy" src="/img/placeholder.jpg" data-src="https://addyzk.github.io/Random-img/16.jpg" alt="mysql优化">
							</a>
						</div>
					</li>											
			
			
					<li>
						<div class="relate-post-text">
							<a class="relate-post-title" href="../../../05/12/redis/" title="redis">
								redis			
							</a>
							<p class="relate-post-date">
								<i class="fa fa-calendar"></i>
								五月 12日, 2018				
							</p>
							<p class="relate-post-content">
								redis教程：概述redis是一种支持分布式的nosql数据库,他的数据是保存在内存中，同时redis可以定时把内存数据同步到磁盘，即可以将数据持久化，并且他比memcached支持更多的数据结构(string,list列表[队列和...
							</p>
						</div>

						<div class="relate-post-cover">
							<a href="../../../05/12/redis/" title="redis">				
								
								<img class="lazy" src="/img/placeholder.jpg" data-src="https://addyzk.github.io/Random-img/10.jpg" alt="redis">
							</a>
						</div>
					</li>											
			
			
					<li>
						<div class="relate-post-text">
							<a class="relate-post-title" href="../../../04/23/git/" title="Git!">
								Git!			
							</a>
							<p class="relate-post-date">
								<i class="fa fa-calendar"></i>
								四月 23日, 2018				
							</p>
							<p class="relate-post-content">
								Git 的基本认识，常用命令，以及使用流程，冲突管理分支管理等。
Git1.git简介1234- workspace 工作区- index 暂存区- repository 本地版本库- remote 远程仓库
2.常用git命令1所有...
							</p>
						</div>

						<div class="relate-post-cover">
							<a href="../../../04/23/git/" title="Git!">				
								
								<img class="lazy" src="/img/placeholder.jpg" data-src="https://addyzk.github.io/Random-img/47.jpg" alt="Git!">
							</a>
						</div>
					</li>											
			
			
					<li>
						<div class="relate-post-text">
							<a class="relate-post-title" href="../../../04/14/mysql/" title="mysql">
								mysql			
							</a>
							<p class="relate-post-date">
								<i class="fa fa-calendar"></i>
								四月 14日, 2018				
							</p>
							<p class="relate-post-content">
								数据库一、数据库基本概念数据的仓库:  
数据库服务器–&gt;数据库—&gt;表–&gt;记录-&gt;属性
1sudo apt-get install -y mysql-server mysql-client
二、SQL基本可分为...
							</p>
						</div>

						<div class="relate-post-cover">
							<a href="../../../04/14/mysql/" title="mysql">				
								
								<img class="lazy" src="/img/placeholder.jpg" data-src="https://addyzk.github.io/Random-img/13.jpg" alt="mysql">
							</a>
						</div>
					</li>											
			
			
					<li>
						<div class="relate-post-text">
							<a class="relate-post-title" href="../../../02/18/Django-rest-framework/" title="DRF">
								DRF			
							</a>
							<p class="relate-post-date">
								<i class="fa fa-calendar"></i>
								二月 18日, 2018				
							</p>
							<p class="relate-post-content">
								一、RESTREST是”Representational State Transfer”缩写，即是”表现层状态转化”。而”表现层”其实指的是”资源(Resource)”的表现层。12表现层: 资源(例如图片、歌曲、用户....)状态转...
							</p>
						</div>

						<div class="relate-post-cover">
							<a href="../../../02/18/Django-rest-framework/" title="DRF">				
								
								<img class="lazy" src="/img/placeholder.jpg" data-src="https://addyzk.github.io/Random-img/31.jpg" alt="DRF">
							</a>
						</div>
					</li>											
			
			
		</ul>
	
</div>	
			</div>
			<div class="investment-content-list">
				<div class="layout-comment">

	

		

			<!-- gitalk comment -->
			<!-- show gitalk comment -->
<div id="gitalk-container"></div>

<!-- gitalk`s css & js -->
<link rel="stylesheet" href="https://unpkg.com/gitalk/dist/gitalk.css">
<link rel="stylesheet" href="/SorrisiYi/css/comment.css">
<script src="https://cdn.bootcss.com/blueimp-md5/2.10.0/js/md5.min.js"></script>
<script src="https://unpkg.com/gitalk/dist/gitalk.min.js"></script>

<script type="text/javascript">
	//Thanks O-R
	//https://github.com/gitalk/gitalk/issues/102#issuecomment-382970552
	//去除尾部匹配正则数组的字符串  
	//Remove redundant characters
	String.prototype.trimEnd = function(regStr) {
		var result = this;
		if(regStr == undefined || regStr == null || regStr == "") {
			return result;
		}
		var array = regStr.split(',');

		if(array.length > 0) {

			var c = array.shift();
			var str = this;
			var i = str.length;
			var rg = new RegExp(c);
			var matchArr = str.match(rg);

			if(matchArr != undefined && matchArr != null && matchArr.length > 0) {
				var matchStr = matchArr[0].replace(/\\/g, "\\\\").replace(/\*/g, "\\*")
					.replace(/\+/g, "\\+").replace(/\|/g, "\\|")
					.replace(/\{/g, "\\{").replace(/\}/g, "\\}")
					.replace(/\(/g, "\\(").replace(/\)/g, "\\)")
					.replace(/\^/g, "\\^").replace(/\$/g, "\\$")
					.replace(/\[/g, "\\[").replace(/\]/g, "\\]")
					.replace(/\?/g, "\\?").replace(/\,/g, "\\,")
					.replace(/\./g, "\\.").replace(/\&/g, "\\&");
				matchStr = matchStr + '$';
				result = str.replace(new RegExp(matchStr), "");
			}

			if(array.length > 0) {
				return result.trimEnd(array.join())
			} else {
				return result;
			}
		}
	};

	//Create gitalk
	var gitalk = new Gitalk({
		clientID: 'fa840d66074e8a6722c9',
		clientSecret: '039c6b559c7710f00e235c26795a2e2ecb613161',
		//id: window.location.pathname,
		//id: decodeURI(window.location.pathname),
		//id: (window.location.pathname).split("/").pop().substring(0, 49),
		id: decodeURI( md5( location.href.trimEnd('#.*$,\\?.*$,index.html$') ) ),
		repo: 'annie-gitalk',
		owner: 'SorrisoYi',
		admin: 'SorrisoYi',
		distractionFreeMode: 'true',
	})
	gitalk.render('gitalk-container');
</script>

		
		
	

</div>
			</div>
			<div class="investment-content-list">
				<div class="layout-share">
	
	

		

			<!-- addThis share -->
			<!-- www.addthis.com/dashboard -->

	<div class="addthis_inline_share_toolbox">
	</div>

	<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-xxx" async="async"></script>


		
		
	
</div>


			</div>
		</div>	
	</div>
	</div>
</div>



	<!-- leancloud -->
	<!--
	时间：2018-11-27
	描述：
		文章访问量：visitors
		文章喜欢量：likes	
		文章排行榜：topNPost
		其他得说明：
			01-Cookie相关的函数 
				https://blog.csdn.net/somehow1002/article/details/78511541（Author：somehow1002）
			02-visitors相关的函数 
				https://blog.csdn.net/u013553529/article/details/63357382（Author：爱博客大伯）
				https://notes.doublemine.me/2015-10-21-为NexT主题添加文章阅读量统计功能.html（Author：夏末）
			03-topNPost相关的函数
				https://hoxis.github.io/hexo-next-read-rank.html（Author：hoxis）
			04-likes相关的函数，
				参考了01 & 02进行简单的设计与实现
-->



	<script>
		var appid = 'bdanoXQN5zgeVyspG5e9RF7o-gzGzoHsz',
            appkey = 'RVVmwDan5FhjuwkKxenjOGSE';	  
        AnnieLeancloud(appid, appkey);         
	</script>
    

	


<!-- show math formula -->



	 
	<script src="../../../../plugin/clipboard/clipboard.js"></script>
	<script>
		// Copy code !
	    function codePreprocessing() {
	        $("#article-content .highlight").each(function() {

	            $(this).wrap('<div id="post-code"></div>');

	        })

	        $("#article-content #post-code").each(function() {

	            $(this).prepend('<nav class="copy-nav"><span><i class="code-language"></i></span></nav>');

	        })

	        $("#article-content .copy-nav").each(function() {
	            var temp = $(this).next().attr('class'),
	                language = ((temp.length > 9) && (temp != null)) ? temp.substr(10) : "none"; //why 9? Need to check language?

	            $(this).find('.code-language').text(language);

	            $(this).append('<span class="copy-btn"><i class="fa fa-copy" aria-hidden="true"></i></span>');

	        });
	    }

		function codeCopy() {
		    $('#article-content #post-code').each(function(i) {
		        var codeCopyId = 'codeCopy-' + i;

		        var codeNode = $(this).find('.code'),
		            copyButton = $(this).find('.copy-btn');

		        codeNode.attr('id', codeCopyId);
		        copyButton.attr('data-clipboard-target-id', codeCopyId);
		    })

		    
			var clipboard = new ClipboardJS('.copy-btn', {
					target: function(trigger) {
						return document.getElementById(trigger.getAttribute('data-clipboard-target-id'));
					}
		      	});

			//pure js
			function showTooltip(elem, msg) {		   
				elem.setAttribute('aria-label', msg);
				elem.setAttribute('class', 'copy-btn copy-status');
				setTimeout(function() {
					elem.setAttribute('class', 'copy-btn');
				}, 2000);
			}

			clipboard.on('success', function(e) {
			    e.clearSelection();
			    console.info('Action:', e.action);		   
			    console.info('Trigger:', e.trigger);
			    showTooltip(e.trigger, 'Copied!');
			    
			});
			clipboard.on('error', function(e) {
			    console.error('Action:', e.action);
			    console.error('Trigger:', e.trigger);
			});
		

		}

		if ($('.layout-post').length) {
		    codePreprocessing();
		    codeCopy();
		} 
	</script>





<link rel="stylesheet" href="../../../../plugin/fancybox/jquery.fancybox.css">
<script src="../../../../plugin/fancybox/jquery.fancybox.js"></script>

<script type="text/javascript">
	var titleID = $('.article-title a'),
		imageID = $('.article-content img'),
		videoID = $('.article-content video');

	var postTitle = titleID.text() ? titleID.text() : "No post title!";

	imageID.each(function() {
		var imgPath = $(this).attr('src'),
			imgTitle = $(this).attr('alt') ? $(this).attr('alt') : "No image description!";

		//给每个匹配的<img>元素打包, 即添加父元素<a>
		$(this).wrap('<a data-fancybox="gallery" data-caption=" 《 ' + postTitle + ' 》 ' + imgTitle + ' "  href=" ' + imgPath + ' "> </a>');
	});

	videoID.each(function() {
		var videoPath = $(this).attr('src');

		//给每个匹配的<img>元素打包, 即添加父元素<a>
		$(this).wrap('<a data-fancybox href=" ' + videoPath + ' "> </a>');
	});
	//TODO：支持html5 video

	if($('#layout-post').length) {
		$('[data-fancybox="gallery"]').fancybox({
			loop: true,
			buttons: [
				"zoom",
				"share",
				"slideShow",
				"fullScreen",
				//"download",
				"thumbs",
				"close"
			],
			protect: false
		});
	}
</script>
		</main>

		<!--footer-->
		<footer>
	<div class="social">
		<ul>
	
		<li>
			<a href="http://github.com/addyzk" target="_blank">
				<i class="fa fa-github"></i>
			</a>
		</li>
	
		<li>
			<a href="https://weibo.com/u/2943549915" target="_blank">
				<i class="fa fa-weibo"></i>
			</a>
		</li>
	
		<li>
			<a href="http://github.com/" target="_blank">
				<i class="fa fa-pinterest"></i>
			</a>
		</li>
	
		<li>
			<a href="http://github.com/" target="_blank">
				<i class="fa fa-instagram"></i>
			</a>
		</li>
	
		<li>
			<a href="http://github.com/" target="_blank">
				<i class="fa fa-twitter"></i>
			</a>
		</li>
	
		<li>
			<a href="../../../../atom.xml" target="_blank">
				<i class="fa fa-rss"></i>
			</a>
		</li>
			
</ul>

	</div>
		
	<div class="copyright">
		<p>
			 
				&copy;2016 - 2019, content by SorrisoYi. All Rights Reserved.
			
			
			

	<!-- busuanzi -->
	<!-- busuanzi -->

		
	<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
	

		<span id="busuanzi_container_page_pv">
	  		本文总阅读量<span id="busuanzi_value_page_pv"></span>次
		</span>

	




		</p>
		<p>
			<a href="http://hexo.io/" title="Hexo" target="_blank" rel="noopener">Hexo</a> Theme <a href="https://github.com/Sariay/hexo-theme-Annie" title="Annie" target="_blank" rel="noopener">Annie</a> by Sariay.
			<a href="javascript:zh_tran('s');" class="zh_click" id="zh_click_s">简体</a> 
			<a href="javascript:zh_tran('t');" class="zh_click" id="zh_click_t">繁體</a>				
		</p>
	</div>		
</footer>
		
	<!-- set '1' to show motto in all pages! -->

	<script src="../../../../plugin/motto/motto.js"></script>
	
	<script type="text/javascript">
		$(".motto").html( getMingYanContent() );
	</script>	




	<!--
	时间：2018-10-3
	描述：
		插件名称：hexo-generator-search-zip
		插件来源: https://github.com/SuperKieran/hexo-generator-search-zip
		代码参考：https://github.com/SuperKieran/TKL/blob/master/layout/_partial/search.ejs(Include: js & css)	
-->
<div class="popup search-popup local-search-popup">
	<div class="local-search-container">
		<span class="popup-btn-close">
      		ESC
   		</span>
		<div class="local-search-header">
			<div class="input-prompt">				
			</div>
			<input autocomplete="off" placeholder="Search..." type="text" id="local-search-input">
		</div>
		<div class="local-search-body">
			<div id="local-search-output"></div>
		</div>
		<div class="local-search-footer">
			<div class="topN-post">				
				

   
	<div id="topN">
		<div class="topN-title" data-title="热门文章"></div> 
	</div>
	
    <script>
        var appid = 'bdanoXQN5zgeVyspG5e9RF7o-gzGzoHsz',
            appkey = 'RVVmwDan5FhjuwkKxenjOGSE',
            limitCount = 10;
        if( $('#topN').length ){
            AV.initialize(appid, appkey);
            var Counter = AV.Object.extend("Counter");  
            topNPost(Counter, limitCount);
        }
    </script>
   
								
			</div>
		</div>
	</div>
</div>

<script src="../../../../plugin/search/ziploader.js"></script>
<script src="../../../../plugin/search/search.js"></script>

<script type="text/javascript">
	var search_path = 'search.json',
		zip_Path = '/SorrisiYi/search.zip',
		version_Path = '/SorrisiYi/searchVersion.txt',
		input_Trigger = 'auto',
		top_N = '2';

	themeLocalSearch({
		search_path, 
		zip_Path, 
		version_Path, 
		input_Trigger, 
		top_N
	});
</script>


<!-- love effect -->

	<script src="../../../../plugin/love/love.js"></script>


<!-- back to top -->

	
	<div id="totop">
  		<a href="javascript:;" name="TOTOP" class="fa fa-arrow-up"></a>
	</div>




<!-- site analysis -->


	<!-- site-analysis -->
	
	
	
	
	
 

<script src="../../../../plugin/vibrant/vibrant.js"></script>
<script src="../../../../plugin/chinese/chinese.js"></script>
<script src="../../../../plugin/imgLazyLoader/yall.min.js"></script>
<script src="../../../../plugin/imgResize/jquery.resizeimagetoparent.min.js"></script>
<script src="../../../../plugin/nicescroll/jquery.nicescroll.js"></script>
<script src="../../../../js/resizediv.js"></script>
<script src="../../../../js/main.js"></script>
	</body>	
</html>